-
Notifications
You must be signed in to change notification settings - Fork 229
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update the module using the PDK #344
Conversation
puppetdb::database::postgresql is a classthat may have no external impact to Forge modules. This module is declared in 33 of 579 indexed public
|
Sync from the puppetlabs-apt module for settings related to GitHub actions support and other CI "deprecation".
We are interested in the list of all installed modules, we do not care about messages on stderr like: ``` bash: warning: setlocale: LC_ALL: cannot change locale (fr_FR.UTF-8) ```
We need the contrib packages only with older versions of PostgreSQL. While here include this class when it is needed instead of using a resource to avoid conflicts when another module wants to do this.
PostgreSQL is configured to use snakeoil certificates, but PuppetDB expect to use the Puppet certificates to authenticate with needs more code that we currently have in the tests.
the provision module was not found in /home/runner/work/puppetlabs-puppetdb/puppetlabs-puppetdb/spec/fixtures/modules, please amend the .fixtures.yml file /home/runner/work/puppetlabs-puppetdb/puppetlabs-puppetdb/vendor/bundle/ruby/2.7.0/gems/puppet_litmus-0.34.3/lib/puppet_litmus/rake_helper.rb:121:in `provision' /home/runner/work/puppetlabs-puppetdb/puppetlabs-puppetdb/vendor/bundle/ruby/2.7.0/gems/puppet_litmus-0.34.3/lib/puppet_litmus/rake_tasks.rb:81:in `block (2 levels) in <top (required)>' /home/runner/work/puppetlabs-puppetdb/puppetlabs-puppetdb/vendor/bundle/ruby/2.7.0/gems/honeycomb-beeline-2.11.0/lib/honeycomb/integrations/rake.rb:21:in `block in execute' /home/runner/work/puppetlabs-puppetdb/puppetlabs-puppetdb/vendor/bundle/ruby/2.7.0/gems/honeycomb-beeline-2.11.0/lib/honeycomb/client.rb:65:in `start_span' /home/runner/work/puppetlabs-puppetdb/puppetlabs-puppetdb/vendor/bundle/ruby/2.7.0/gems/honeycomb-beeline-2.11.0/lib/honeycomb/integrations/rake.rb:16:in `execute' /home/runner/work/puppetlabs-puppetdb/puppetlabs-puppetdb/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/exe/rake:27:in `<top (required)>' /opt/hostedtoolcache/Ruby/2.7.6/x64/bin/bundle:23:in `load' /opt/hostedtoolcache/Ruby/2.7.6/x64/bin/bundle:23:in `<main>'
puppet_agent was not found in /home/runner/work/puppetlabs-puppetdb/puppetlabs-puppetdb/spec/fixtures/modules, please amend the .fixtures.yml file /home/runner/work/puppetlabs-puppetdb/puppetlabs-puppetdb/vendor/bundle/ruby/2.7.0/gems/puppet_litmus-0.34.3/lib/puppet_litmus/rake_helper.rb:221:in `block in install_agent' /home/runner/work/puppetlabs-puppetdb/puppetlabs-puppetdb/vendor/bundle/ruby/2.7.0/gems/honeycomb-beeline-2.11.0/lib/honeycomb/client.rb:65:in `start_span' /home/runner/work/puppetlabs-puppetdb/puppetlabs-puppetdb/vendor/bundle/ruby/2.7.0/gems/forwardable-1.3.2/lib/forwardable.rb:238:in `start_span' /home/runner/work/puppetlabs-puppetdb/puppetlabs-puppetdb/vendor/bundle/ruby/2.7.0/gems/puppet_litmus-0.34.3/lib/puppet_litmus/rake_helper.rb:210:in `install_agent' /home/runner/work/puppetlabs-puppetdb/puppetlabs-puppetdb/vendor/bundle/ruby/2.7.0/gems/puppet_litmus-0.34.3/lib/puppet_litmus/rake_tasks.rb:126:in `block (2 levels) in <top (required)>' /home/runner/work/puppetlabs-puppetdb/puppetlabs-puppetdb/vendor/bundle/ruby/2.7.0/gems/honeycomb-beeline-2.11.0/lib/honeycomb/integrations/rake.rb:21:in `block in execute' /home/runner/work/puppetlabs-puppetdb/puppetlabs-puppetdb/vendor/bundle/ruby/2.7.0/gems/honeycomb-beeline-2.11.0/lib/honeycomb/client.rb:65:in `start_span' /home/runner/work/puppetlabs-puppetdb/puppetlabs-puppetdb/vendor/bundle/ruby/2.7.0/gems/honeycomb-beeline-2.11.0/lib/honeycomb/integrations/rake.rb:16:in `execute' /home/runner/work/puppetlabs-puppetdb/puppetlabs-puppetdb/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/exe/rake:27:in `<top (required)>' /opt/hostedtoolcache/Ruby/2.7.6/x64/bin/bundle:23:in `load' /opt/hostedtoolcache/Ruby/2.7.6/x64/bin/bundle:23:in `<main>'
Bolt::PAL::PALError: Could not find module facts containing task file bash.sh
Needed some minor adjustment to `.sync.yml`.
3b8c005
to
3503b08
Compare
For now we want to have running CI. We do not care about the module being fully documented.
They break adding facts from a context.
@@ -184,7 +187,7 @@ | |||
it 'has read ident rule' do | |||
is_expected.to contain_postgresql__server__pg_ident_rule("Map the SSL certificate of the server as a #{params[:read_database_username]} user") | |||
.with_map_name(read_identity_map) | |||
.with_system_username(facts[:fqdn]) | |||
.with_system_username(facts[:networking][:fqdn]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't that be:
.with_system_username(facts[:networking][:fqdn]) | |
.with_system_username(facts[:networking]['fqdn']) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Humm… it seems to be worse. That being said at the beginning of the file we have:
let(:facts) do
{
# ...
networking: {
fqdn: 'cheery-rime@puppet',
},
# ...
}
end
This module is hell… 😱
Current state: out of the failing unit tests, some are due to the module saying it support Ubuntu 16.04 which is EOL and for which the postgresql module drop support more than 1 year ago. I'll try to fix the other unit tests, when done will in another PR to drop EOL OS. |
This was changed in 68d8c64 to fix puppet lint issues, but as the test suite was not run it passed through.
This was changed in 010bf13 to match best practice, but as the test suite was not run it passed through.
The systemd module use this to run `systemctl daemon-reload`. Set an arbitrary value to avoid: > Validation of Exec[systemd-postgresql.service-systemctl-daemon-reload] failed: 'systemctl' is not qualified and no path was specified. Please qualify the command or specify a path.
LGTM regarding unit tests. I will drop Ubuntu 16.04 which has been EOL for 2.5 years in another PR and the unit tests should be green. Because the module has been lagging behind for years, I'll wait for this to be merged before investing more time in fixing the tests. |
all changes were cherry-picked into #385 |
Update with a recent PDK with the latest templates.
Allows up to have working CI.